home *** CD-ROM | disk | FTP | other *** search
Text File | 1990-08-14 | 1.8 KB | 58 lines | [TEXT/CCL ] |
-
- ~---------------------------------------------------------------------------------------~
- ~ Rules for "Generalized Lisp" -- a generalized programming language ~
- ~---------------------------------------------------------------------------------------~
- ~
- ~ Glisp will read a program in any programming language for which rules are supplied.
- ~ The languages may be freely intermixed.
-
-
- -define language Glisp-
-
-
- -Lisp-
-
- `(export '(glispProgram glispLanguage) :glisp)
-
-
- -Plisp-
-
- glispProgram =
- ~ A Glisp program is a sequence of expressions in any Glisp language.
-
- [ <glispLanguage>:p ]* <eof> -> ( [::p]* );
-
-
- glispLanguage =
- ~ A Glisp language is Plisp, Lisp, or a dialect added by someone.
-
- '- Plisp '- <plispProgram>:p -> :p,
-
- '- Lisp '- <lispProgram>:p -> :p,
-
- '- define language <identifier>:lang '- -> <targetLanguage :lang> nil;
-
-
- ~---------------------------------------------------------------------------------------~
- ~ Rules for the Lisp dialect (standard Common Lisp) ~
- ~---------------------------------------------------------------------------------------~
-
- lispProgram =
- ~ A Lisp program is a sequence of Lisp expressions, terminated by a symbol.
- ~ Note: each expression is read using the Glisp read table. In practice, this
- ~ means that ALL LISP EXPRESSIONS SHOULD BE PRECEDED BY A BACK QUOTE (`);
- ~ e.g. `(defun foo (x) x)
-
- <sourceLanguage Lisp> [<lispExpression>:e]* -> :e;
-
-
- lispExpression =
- ~ A "Lisp expression" is any Common Lisp data type except a symbol.
- ~ Function-like things are checked to see if they're being redefined.
-
- ([defun | defmacro | `define-modify-macro | deftype | defpfun] :name ...) ->
- <checkFunction :name>
- ([defun | defmacro | `define-modify-macro | deftype | defpfun] :name ...),
-
- :anything {if `(not (symbolp #$anything)) } -> :anything;
-